home *** CD-ROM | disk | FTP | other *** search
- /********************************/
- /* File: FileClose.c */
- /* */
- /* XCMD to access the file mgr */
- /* call FSClose */
- /* Paramters: */
- /* param0 = file reference from */
- /* the fileopen xcmd */
- /* ---------------------------- */
- /********************************/
-
- #include <MacTypes.h>
- #include <OSUtil.h>
- #include <MemoryMgr.h>
- #include <FileMgr.h>
- #include <ResourceMgr.h>
- #include <pascal.h>
- #include <strings.h>
- #include "HyperXCmd.h"
- #include "HyperUtils.h"
-
-
- pascal void main( paramPtr )
- XCmdBlockPtr paramPtr;
- {
- short refnum;
- char str[256];
-
- /* convert the refnum to a usable form */
- HLock( paramPtr->params[0] );
- ZeroToPas( paramPtr, *(paramPtr->params[0]), &str );
- HUnlock( paramPtr->params[0] );
- refnum = (short)StrToNum( paramPtr, &str );
-
- /* Normally we should check the result */
- /* code but it won't kill us to ignore */
- /* the reslt of a close file call */
- if ( FSClose(refnum) )
- ;
-
- paramPtr->returnValue = 0L;
- }
-
-